package com.dimples.system.service;

import com.dimples.common.entity.SecurityUser;
import com.dimples.system.entity.SysUserOnline;

/**
 * @author zhongyj <1126834403@qq.com><br/>
 * @date 2021/8/9
 */
public interface UserOnlineService {

    /**
     * 通过用户名称查询信息
     *
     * @param userName String
     * @param user     SecurityUser
     * @return SysUserOnline
     */
    SysUserOnline selectOnlineByUserName(String userName, SecurityUser user);

    /**
     * 设置在线用户信息
     *
     * @param user SecurityUser
     * @return SysUserOnline
     */
    SysUserOnline loginUserToUserOnline(SecurityUser user);

    /**
     * 踢出在线用户
     *
     * @param tokenId String
     */
    void removeOnlineUser(String tokenId);
}
